package cn.itcast.feign.client;



import cn.itcast.feign.config.DefaultFeignConfiguration;
import cn.itcast.feign.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

//被调用方的服务名称（注册中心的名称）
@FeignClient(value = "userservice",configuration = DefaultFeignConfiguration.class)
public interface UserFeignClient {

//    @GetMapping("完整路径")
    @GetMapping("/user/{id}")
    User queryById(@PathVariable("id") Long id);
}
